package com.estrend.redbird.net

import com.estrend.redbird.bean.Unhappiness

object SessionIdManager {

    @Volatile
    private var sessionId: Unhappiness? = null

    @Volatile
    private var userToken:String? = null

    @Synchronized
    fun setSessionId(newSessionId: Unhappiness) {
        sessionId = newSessionId
    }

    @Synchronized
    fun clearSessionId() {
        sessionId = null
    }

    @Synchronized
    fun getServiceConstant():String{
        return if (sessionId==null) "EW9RCYQIxeJkiH3dOhcFVx4ZeFLwQnhjw04OaI95EXhWpS_qEI880v-LittuEn_yX-C-54qTJcUi8Lyw7IUDPnJQTB_3r2AqOB7tPjf8yMw" else sessionId!!.mourn
    }
    @Synchronized
    fun getToken():String{
        return if (sessionId==null) "019004de-b45a-73c2-84f4-f7ce481569c9" else sessionId!!.predictably
    }

    @Synchronized
    fun getUserToken():String{
        return if (userToken==null) "" else userToken!!
    }



}